home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / SATHER / !Sather / Library / Containrs / sa / h_map < prev    next >
Text File  |  1996-04-09  |  1KB  |  34 lines

  1. ---------------------------> Sather 1.1 source file <--------------------------
  2. -- h_map.sa: Hash table based map class
  3. -- Author: Benedict A. Gomes <gomes@samosa.ICSI.Berkeley.EDU>
  4. -- Copyright (C) 1995, International Computer Science Institute
  5. -- $Id: h_map.sa,v 1.3 1996/04/09 10:05:04 borisv Exp $
  6. --
  7. -- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
  8. -- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
  9. -- LICENSE contained in the file: Sather/Doc/License of the
  10. -- Sather distribution. The license is also available from ICSI,
  11. -- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
  12. -------------------------------------------------------------------
  13. class H_MAP{K,E} < $MAP{K,E} is
  14.    -- Hash table based on data buckets
  15.    private include DYNAMIC_DATABUCKET_TABLE{K,E} 
  16.    -- Make public
  17.      create->create,
  18.      map_has_ind->has_ind, 
  19.      map_copy->copy,
  20.      map_pair!->pair!, 
  21.      map_elt!->elt!,
  22.      map_key!->ind!, 
  23.      map_delete->delete,
  24.      map_aget->aget,
  25.      map_aset->aset;
  26.    include MAP_INCL{K,E};
  27.  
  28.    delete(k:K) pre ~void(self) is  dummy ::= delete(k)  end;
  29.  
  30.    size: INT is return n_inds end;
  31.  
  32. end; -- H_MAP{K,E}
  33. --=============================================================================
  34.